home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / tlxinstl.zip / ERRHAND.ASM < prev    next >
Assembly Source File  |  1991-10-17  |  14KB  |  544 lines

  1. PAGE  64,132  ; (CTRL-OH)   IBM PC PRINTER CONDENSED MODE
  2. TITLE    ERRHAND
  3.  
  4. EXTRN COL:word
  5. EXTRN COL_HOLD:word
  6. EXTRN ROW:byte
  7. EXTRN boxtl:word
  8. EXTRN boxtr:word
  9. EXTRN boxbl:word
  10. EXTRN boxbr:word
  11. EXTRN colcnt:word
  12. EXTRN cursor_location:word
  13. EXTRN field_start:word
  14. EXTRN field_stop:word
  15. EXTRN inv_screen_attr:byte
  16. EXTRN linecnt:word
  17. EXTRN screen_attr:byte
  18. EXTRN screen_title:byte
  19. EXTRN copyright:byte
  20. EXTRN anykey:byte
  21. EXTRN address1:byte
  22. EXTRN address2:byte
  23. EXTRN phone:byte
  24. EXTRN crlf:byte
  25. EXTRN version:byte
  26. EXTRN stat_port:word
  27. EXTRN video_address:word
  28.  
  29. .model small
  30.  
  31. IF1
  32. INCLUDE     ASSEMBLY.MAC
  33. ENDIF
  34.  
  35.  
  36. ERRORSEGMENT        SEGMENT  PUBLIC 'CODE'
  37.  
  38. ERRHAND PROC    FAR
  39.  
  40.     ASSUME    CS:ERRORSEGMENT
  41. PUBLIC    ERRHAND
  42.  
  43.     JMP    START
  44.  
  45. cr    equ    0DH
  46. lf    equ    0AH
  47. eof    equ    1AH
  48.  
  49. ;--------------------------- messages ------------------------------
  50.  
  51. err_1    db    'invalid function number',              cr,lf,'$'
  52. err_2    db    'file not found',                       cr,lf,'$'
  53. err_3    db    'path not found',                       cr,lf,'$'
  54. err_4    db    'to many open files (no handles left)', cr,lf,'$'
  55. err_5    db    'access denied',                        cr,lf,'$'
  56. err_6    db    'invalid handle',                       cr,lf,'$'
  57. err_7    db    'memory control blocks destroyed',      cr,lf,'$'
  58. err_8    db    'insufficient memory',                  cr,lf,'$'
  59. err_9    db    'invalid memory block address',         cr,lf,'$'
  60. err_10    db    'invalid environment',                  cr,lf,'$'
  61. err_11    db    'invalid format',                       cr,lf,'$'
  62. err_12    db    'invalid access code',                  cr,lf,'$'
  63. err_13    db    'invalid data',                         cr,lf,'$'
  64. err_14    db    'invalid error message NOT USED',       cr,lf,'$'
  65. err_15    db    'invalid drive was specified',          cr,lf,'$'
  66. err_16    db    'attempt to remove current directory',  cr,lf,'$'
  67. err_17    db    'not same device',                      cr,lf,'$'
  68. err_18    db    'no matching or no more wildcard files', cr,lf,'$'
  69. err_19    db    'attempt to write on write procted disk',cr,lf,'$'
  70. err_20    db    'unknown unit',                          cr,lf,'$'
  71. err_21    db    'drive not ready',                       cr,lf,'$'
  72. err_22    db    'end of file mark not found in file - ',cr,lf,'$'
  73. err_23    db    'data error (crc)',                     cr,lf,'$'
  74. err_24    db    'bad request structure length',         cr,lf,'$'
  75. err_25    db    'seek error',                           cr,lf,'$'
  76. err_26    db    'unknown media type',                   cr,lf,'$'
  77. err_27    db    'sector not found',                     cr,lf,'$'
  78. err_28    db    'printer out of paper',                 cr,lf,'$'
  79. err_29    db    'write fault',                          cr,lf,'$'
  80. err_30    db    'read fault',                           cr,lf,'$'
  81. err_31    db    'general failure',                      cr,lf,'$'
  82. err_32    db    'sharing violation',                    cr,lf,'$'
  83. err_33    db    'lock violation',                       cr,lf,'$'
  84. err_34    db    'invalid disk change',                  cr,lf,'$'
  85. err_35    db    'fcb unavailable',                      cr,lf,'$'
  86. err_36    db    'sharing buffer overflow',              cr,lf,'$'
  87. err_37    db    'reserved',                             cr,lf,'$'
  88. err_38    db    'reserved',                             cr,lf,'$'
  89. err_39    db    'reserved',                             cr,lf,'$'
  90. err_40    db    'reserved',                             cr,lf,'$'
  91. err_41    db    'reserved',                             cr,lf,'$'
  92. err_42    db    'reserved',                             cr,lf,'$'
  93. err_43    db    'reserved',                             cr,lf,'$'
  94. err_44    db    'reserved',                             cr,lf,'$'
  95. err_45    db    'reserved',                             cr,lf,'$'
  96. err_46    db    'reserved',                             cr,lf,'$'
  97. err_47    db    'reserved',                             cr,lf,'$'
  98. err_48    db    'reserved',                             cr,lf,'$'
  99. err_49    db    'reserved',                             cr,lf,'$'
  100. err_50    db    'network request not supported',        cr,lf,'$'
  101. err_51    db    'remote computer not listening',        cr,lf,'$'
  102. err_52    db    'duplicate name on network',            cr,lf,'$'
  103. err_53    db    'network name not found',               cr,lf,'$'
  104. err_54    db    'network busy',                         cr,lf,'$'
  105. err_55    db    'network device no longer exist',       cr,lf,'$'
  106. err_56    db    'net BIOS command limit exceeded',      cr,lf,'$'
  107. err_57    db    'network adapter hardware error',       cr,lf,'$'
  108. err_58    db    'incorrect response from network',      cr,lf,'$'
  109. err_59    db    'unexpected network error',             cr,lf,'$'
  110. err_60    db    'incompatiable remote adapter',         cr,lf,'$'
  111. err_61    db    'print que full',                       cr,lf,'$'
  112. err_62    db    'not enough space for print file',      cr,lf,'$'
  113. err_63    db    'print file was deleted',               cr,lf,'$'
  114. err_64    db    'network name was deleted',             cr,lf,'$'
  115. err_65    db    'access denied',                        cr,lf,'$'
  116. err_66    db    'network device type incorrect',        cr,lf,'$'
  117. err_67    db    'network name not found',               cr,lf,'$'
  118. err_68    db    'network name limit exceeded',          cr,lf,'$'
  119. err_69    db    'net BIOS session limit exceeded',      cr,lf,'$'
  120. err_70    db    'temporarily paused',                   cr,lf,'$'
  121. err_71    db    'network request not accepted',         cr,lf,'$'
  122. err_72    db    'print or disk redirection is paused',  cr,lf,'$'
  123. err_73    db    'reserved',                             cr,lf,'$'
  124. err_74    db    'reserved',                             cr,lf,'$'
  125. err_75    db    'reserved',                             cr,lf,'$'
  126. err_76    db    'reserved',                             cr,lf,'$'
  127. err_77    db    'reserved',                             cr,lf,'$'
  128. err_78    db    'reserved',                             cr,lf,'$'
  129. err_79    db    'reserved',                             cr,lf,'$'
  130. err_80    db    'file exists',                          cr,lf,'$'
  131. err_81    db    'resevered',                            cr,lf,'$'
  132. err_82    db    'cannot make directory entry',          cr,lf,'$'
  133. err_83    db    'fail on interrupt 24',                 cr,lf,'$'
  134. err_84    db    'too many redirections',                cr,lf,'$'
  135. err_85    db    'duplicate redirection',                cr,lf,'$'
  136. err_86    db    'invalid password',                     cr,lf,'$'
  137. err_87    db    'network data fault',                   cr,lf,'$'
  138. err_88    db    'seek error',                           cr,lf,'$'
  139.  
  140. START:
  141.     push    ax
  142.  
  143.     EQUIP_CHK          ;macro determines if color or mono
  144.     MOV    ES,AX          ;screen is connected
  145.     CMP    AX,0B000H
  146.     JNE    COLOR
  147.  
  148. SCREEN    SEGMENT  AT   0B000H      ;Monochrome screen
  149. SCREEN    ENDS
  150.     JMP    SHORT SET_SCREEN
  151. ;
  152. COLOR:
  153. SCREEN    SEGMENT  AT   0B800H      ;Color screen
  154. SCREEN    ENDS
  155. ;
  156. SET_SCREEN:
  157.     ASSUME    ES:SCREEN
  158.  
  159.     clr
  160.     MAKEBOX  6,12,17,66    ;startline,startcol,stopline,stopcol
  161.     calc_addr 12,15
  162.     cursor
  163.  
  164.     pop    ax
  165.     push    ds
  166.     push    ax
  167.     mov    ax,cs
  168.     mov    ds,ax
  169.     pop    ax
  170.  
  171.     cmp    al,0
  172.     jne    _01
  173.     jmp    err_exit
  174. _01:
  175.     cmp    al,1
  176.     jne    cmp_2
  177.     mov    dx,offset cs:err_1
  178.     jmp    print_msg
  179. cmp_2:    cmp    al,2
  180.     jne    cmp_3
  181.     mov    dx,offset cs:err_2
  182.     jmp    print_msg
  183. cmp_3:    cmp    al,3
  184.     jne    cmp_4
  185.     mov    dx,offset cs:err_3
  186.     jmp    print_msg
  187. cmp_4:    cmp    al,4
  188.     jne    cmp_5
  189.     mov    dx,offset cs:err_4
  190.     jmp    print_msg
  191. cmp_5:    cmp    al,5
  192.     jne    cmp_6
  193.     mov    dx,offset cs:err_5
  194.     jmp    print_msg
  195. cmp_6:    cmp    al,6
  196.     jne    cmp_7
  197.     mov    dx,offset cs:err_6
  198.     jmp    print_msg
  199. cmp_7:    cmp    al,7
  200.     jne    cmp_8
  201.     mov    dx,offset cs:err_7
  202.     jmp    print_msg
  203. cmp_8:    cmp    al,8
  204.     jne    cmp_9
  205.     mov    dx,offset cs:err_8
  206.     jmp    print_msg
  207. cmp_9:    cmp    al,9
  208.     jne    cmp_10
  209.     mov    dx,offset cs:err_9
  210.     jmp    print_msg
  211. cmp_10: cmp    al,10
  212.     jne    cmp_11
  213.     mov    dx,offset cs:err_10
  214.     jmp    print_msg
  215. cmp_11: cmp    al,11
  216.     jne    cmp_12
  217.     mov    dx,offset cs:err_11
  218.     jmp    print_msg
  219. cmp_12: cmp    al,12
  220.     jne    cmp_13
  221.     mov    dx,offset cs:err_12
  222.     jmp    print_msg
  223. cmp_13: cmp    al,13
  224.     jne    cmp_14
  225.     mov    dx,offset cs:err_13
  226.     jmp    print_msg
  227. cmp_14: cmp    al,14
  228.     jne    cmp_15
  229.     mov    dx,offset cs:err_14
  230.     jmp    print_msg
  231. cmp_15: cmp    al,15
  232.     jne    cmp_16
  233.     mov    dx,offset cs:err_15
  234.     jmp    print_msg
  235. cmp_16: cmp    al,16
  236.     jne    cmp_17
  237.     mov    dx,offset cs:err_16
  238.     jmp    print_msg
  239. cmp_17: cmp    al,17
  240.     jne    cmp_18
  241.     mov    dx,offset cs:err_17
  242.     jmp    print_msg
  243. cmp_18: cmp    al,18
  244.     jne    cmp_19
  245.     mov    dx,offset cs:err_18
  246.     jmp    print_msg
  247. cmp_19: cmp    al,19
  248.     jne    cmp_20
  249.     mov    dx,offset cs:err_19
  250.     jmp    print_msg
  251. cmp_20: cmp    al,20
  252.     jne    cmp_21
  253.     mov    dx,offset cs:err_20
  254.     jmp    p